package com.fadadianqi.logistics.customer.dao;

import com.fadadianqi.commons.BaseDAO;
import com.fadadianqi.logistics.customer.model.Customer;
import com.yeqiangwei.commons.util.Pagination;

import java.util.List;

public interface CustomerDAO extends BaseDAO<Customer> {

    Customer getByNameAndVillageId(String customerName, String villageId);

    List<Customer> findAll(Pagination pagination);

    List<Customer> findAllByVillageId(String villageId, Pagination pagination);

    Integer countAll();

    Integer countByVillageId(String villageId);

    void updateTownIdByVillageId(String townId, String id);

    List<Customer> findAllNotIndexed(Pagination pagination);

    int countAllNotIndexed();

    int countByTownId(String townId);

    List<Customer> findAllByTownId(String townId, Pagination pagination);

}
